<template>
	<div style="background-color: #000;min-height: 100vh;color: #fff;">
		<div style="position: relative;height:4em;overflow: hidden;">
			<div style="position:absolute;top: 0;left: 0;right: 0;height: 7em;background-color: #fff;opacity: 0.5;">
			</div>
			<div style="position: absolute;left: 1.0em;top: 0px;">
				<image :src="imgHttp + '/test/bg/logo.png'" style="height: 4em;width: 7em;"></image>
			</div>
		</div>
		<div @click="toIndex" style="display: flex;justify-items: center;margin: 0.5em;">
			<div>
				<image :src="imgHttp+'/test/back.png'" style="width: 1.5em;height:1.5em;"></image>
			</div>
			<div style="font-size: 1em;">返回首页</div>
		</div>
		<div style="text-align: center;font-size: 1.5em;margin-bottom: 1.0em;margin-top: 1.2em;">{{ caName }}</div>
		<div style="text-align: center;">
			<image :src="http+caDetail" style="width: 90%;height:50em;"></image>
		</div>
	</div>
</template>

<script>
	import api from '@/common/httprequest.js'
	export default {
		data() {
			return {
				imgHttp:api.getImgUrl(),
				caName:null,
				caDetail:null,
				http:api.getUrl(),
				obj: {},
				objs: []
			}
		},
		onLoad(options) {
			//alert(options.id);
			this.loadData(options.id);
		},
		mounted() {

		},
		methods: {
			toIndex() {
				uni.switchTab({
					url: '../index/index'
				})
			},
			loadData(id) {
				uni.showLoading({
					title: '数据处理中...'
				});
				api.request({
					method: "GET",
					url: "/applet/case/list",
					params: {
						"id": id
					},
				}).then(res => {
					uni.hideLoading();
					//alert(JSON.stringify(res));				
					if (res.code == 200) {
						this.objs = res.rows;
						this.caName = res.rows[0].caName;
						this.caDetail = res.rows[0].caDetail; 
					}
				});
			}
		}
	}
</script>

<style>
	.clear {
		clear: both;
	}
</style>